package com.yhgarden.bbs.mapper.system;

import com.yhgarden.bbs.entity.system.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by caimb on 2017/4/27.
 */
public interface RoleMapper {

    public int create(Role role);

    public int update(Role role);

    public int delete(@Param("id") String id);

    public Role getById(String id);

    public List<Role> getByPid(@Param("pid") String pid);

    public Role getByIdMoreDetail(String id);

    public List<Role> query(@Param("example") Role role,
                            @Param("order") String order,
                            @Param("field") String field);

    public List<Role> queryForList(@Param("example") Role role,
                                      @Param("order") String order,
                                      @Param("field") String field);

    public List<Role> queryMoreDetail(@Param("example") Role role,
                                      @Param("order") String order,
                                      @Param("field") String field);

    public List<Role> getSystemUserRoles(@Param("userId") String userId);

    public List<Role> getUserRoles(@Param("userId") String userId);
}
